<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:h="http://java.sun.com/jsf/html"  
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../templates/FoodSageTemplate.xhtml">

    <ui:define name="logout">
        <p:commandLink id="logoutLink" actionListener="#{touristLogoutManagedBean.doLogout}" value="#{bundle['login.logout.label']}" ajax="false" immediate="true" />
    </ui:define>

    <ui:define name="main_menu">
        <f:view beforePhase="#{itineraryProvideTravelInfoManagedBean.initView}"/>
        <p:menubar model="#{itineraryProvideTravelInfoManagedBean.touristMainMenuModel}"/>
    </ui:define>

    <ui:define name="nav_menu">
        <p:menu model="#{itineraryProvideTravelInfoManagedBean.touristNavMenuModel}"/>
    </ui:define>

    <ui:define name="content">

        <p:messages/>

        <p:panel id="itineraryProvideTravelInfoDetail" header="#{bundle['itineraryProvideTravelInfo.header.panel']}"  >

            <h:panelGrid columns="6" cellpadding="5">
                <h:outputLabel id="itineraryItineraryName" value ="#{bundle['itinerary.itineraryName.label']}" style="font-weight: bold" />
                <p:inputText id="itineraryName" value="#{itineraryProvideTravelInfoManagedBean.itineraryName}" />
                <p:message for="itineraryName"/>
                
                <h:outputText value="&nbsp;" />
                <h:outputText value="&nbsp;" />
                <h:outputText value="&nbsp;" />
                
                <h:outputLabel id="itineraryArrivalDate" value ="#{bundle['itinerary.arrivalDate.label']}" style="font-weight: bold" />
                <p:calendar id="arrivalDate" value="#{itineraryProvideTravelInfoManagedBean.arrivalDate}" mindate="today" navigator="true" required="true" requiredMessage="#{bundle['itinerary.arrivalDate.required']}" pattern="yyyy-MM-dd" />
                <p:message for="arrivalDate"/>

                <h:outputLabel id="itineraryArrivalTime" value ="#{bundle['itinerary.arrivalTime.label']}" style="font-weight: bold" />
                <h:selectOneMenu id="arrivalTime" value="#{itineraryProvideTravelInfoManagedBean.arrivalTime}" required="true" requiredMessage="#{bundle['itinerary.arrivalTime.required']}">
                    <f:selectItems value="#{enumTime24H.listItems}"/>
                </h:selectOneMenu>
                <p:message for="arrivalTime"/>

                <h:outputLabel id="itineraryDepartureDate" value ="#{bundle['itinerary.departureDate.label']}" style="font-weight: bold" />
                <p:calendar id="departureDate" value="#{itineraryProvideTravelInfoManagedBean.departureDate}" mindate="today" navigator="true" required="true" requiredMessage="#{bundle['itinerary.departureDate.required']}" pattern="yyyy-MM-dd" />
                <p:message for="departureDate"/>

                <h:outputLabel id="itineraryDepartureTime" value ="#{bundle['itinerary.departureTime.label']}" style="font-weight: bold" />
                <h:selectOneMenu id="departureTime" value="#{itineraryProvideTravelInfoManagedBean.departureTime}" required="true" requiredMessage="#{bundle['itinerary.departureTime.required']}">
                    <f:selectItems value="#{enumTime24H.listItems}"/>
                </h:selectOneMenu>
                <p:message for="departureTime"/>
            </h:panelGrid>

            <h:panelGrid columns="3" cellpadding="5">
                <h:outputLabel id="itineraryAccomodationPostalCode" value ="#{bundle['itinerary.accomodationPostalCode.label']}" style="font-weight: bold" />
                <p:inputText id="accomodationPostalCode" value="#{itineraryProvideTravelInfoManagedBean.accomodationPostalCode}" />
                <p:message for="accomodationPostalCode"/>
            </h:panelGrid>

            <h:panelGrid columns="6" cellpadding="5">
                <h:outputLabel id="itineraryAdultNo" value ="#{bundle['itinerary.adultNo.label']}" style="font-weight: bold" />
                <p:inputText id="adultNo" value="#{itineraryProvideTravelInfoManagedBean.noOfAdult}" />
                <p:message for="adultNo"/>

                <h:outputLabel id="itineraryChildrenNo" value ="#{bundle['itinerary.childrenNo.label']}" style="font-weight: bold" />
                <p:inputText id="childrenNo" value="#{itineraryProvideTravelInfoManagedBean.noOfChildren}" />
                <p:message for="childrenNo"/>
            </h:panelGrid>

            <p:ajaxStatus style="width:16px;height:16px;">
                <f:facet name="start">
                    <h:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value="" />
                </f:facet>
            </p:ajaxStatus>
            <p:commandButton id="itineraryTravelInfoUpdateButton" value="#{bundle['itinerary.update.button']}" update="panel" actionListener="#{itineraryProvideTravelInfoManagedBean.updateTouristTravelInfo}" ajax="true" />
            <p:commandButton id="itineraryTravelInfoResetButton" value="#{bundle['itinerary.reset.button']}" type="reset"/>
        </p:panel>
    </ui:define>  

</ui:composition>

